package com.xfpp.javaDemo.iterator;

import com.xfpp.javaDemo.iterator.ArrayList;
import com.xfpp.javaDemo.iterator.Collection;
import com.xfpp.javaDemo.iterator.LinkedList;

public class ContainerTest {

	public static void main(String[] args) {
		//ArrayList al = new ArrayList();
//		LinkedList al = new LinkedList();
		Collection c = new ArrayList();
		for (int i = 0; i < 15; i++) {
			c.add(new Dog(i));
		}
		System.out.println(c.getSize());
		
		Iterator it = c.iterator();
		while(it.hasNext()) {
			Object o = it.next();
			System.out.print(o + " ");
		}
	}

}
